home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / earcd / util / dir / managers.lha / Managers / Dir / RexxCheck.g < prev   
Text File  |  1997-01-15  |  2KB  |  73 lines

  1. G4C
  2.  
  3. ; Routine to make sure that rexxmast has been launched and that
  4. ; RX and WaitForPort have been made resident.
  5.  
  6. ; Only needed if G4C is run from the WB
  7.  
  8. ; Before calling it, check if variable $REXXOK = 1. 
  9. ; If it is, it means that this routine has already been run successfuly.
  10.  
  11. xOnLoad
  12.  
  13. if $REXXOK = 1            ; rexxcheck.g has already been run
  14.    guiquit rexxcheck.g
  15.    stop
  16. endif
  17.  
  18. ifexists file rexxmast          ; means that Gui4Cli knows default paths
  19.    ifexists file rx             ; so no need for this
  20.       REXXOK = 1
  21.       guiquit rexxcheck.g
  22.       stop
  23.    endif
  24. endif
  25.  
  26. REXXOK    = 0
  27.  
  28. ; Check for RexxMast
  29.  
  30. ifexists port REXX
  31.    ; ok - rexxmast already loaded
  32. else
  33.    ifexists file sys:system/rexxmast
  34.        run 'sys:system/rexxmast'
  35.    else
  36.        ezreq "RexxMast not found\nplease start it manually\nand try again" OK ""
  37.        guiquit rexxcheck.g
  38.        stop
  39.    endif
  40.    wait port REXX 50
  41.    if $$RETCODE > 0
  42.        ezreq 'Could not run RexxMast!' ABORT ""
  43.        guiquit rexxcheck.g
  44.        stop
  45.    endif
  46. endif
  47.  
  48. ; Make RX resident
  49.  
  50. ifexists file sys:rexxc/rx
  51.    run 'resident sys:rexxc/rx pure add'
  52. else
  53.    ezreq 'Sys:rexxc/RX not found!\nI need it to run ARexx.' OK ''
  54.    guiquit rexxcheck.g
  55.    stop
  56. endif
  57.  
  58. ; Make WaitForPort resident
  59.  
  60. ifexists file sys:rexxc/waitforport
  61.    run 'resident sys:rexxc/waitforport pure add'
  62. else
  63.    ezreq 'Sys:rexxc/WaitForport not found!\nI need it to run ARexx.' OK ''
  64.    guiquit rexxcheck.g
  65.    stop
  66. endif
  67.  
  68. ; Everything allright
  69.  
  70. REXXOK = 1
  71. guiquit rexxcheck.g
  72.  
  73.